<?php

class City {
	private $cityList;
	function City(){
		$this->cityList[0]="河南";
		$this->cityList[1]="浙江";
		$this->cityList[2]="湖南";
		$this->cityList[3]="云南";
		$this->cityList[4]="北京";
		$this->cityList[5]="河北";
		$this->cityList[6]="山西";
		$this->cityList[7]="内蒙古";
		$this->cityList[8]="辽宁";
		$this->cityList[9]="吉林";
		$this->cityList[10]="黑龙江";
		$this->cityList[11]="江苏";
		$this->cityList[12]="安徽";
		$this->cityList[13]="福建";
		$this->cityList[14]="江西";
		$this->cityList[15]="山东";
		$this->cityList[16]="湖北";
		$this->cityList[17]="广东";
		$this->cityList[18]="广西";
		$this->cityList[19]="海南";
		$this->cityList[20]="四川";
		$this->cityList[21]="贵州";
		$this->cityList[22]="西藏";
		$this->cityList[23]="陕西";
		$this->cityList[24]="青海";
		$this->cityList[25]="甘肃";
		$this->cityList[26]="新疆";
		$this->cityList[27]="宁夏";
		$this->cityList[28]="上海";
		$this->cityList[29]="天津";
		$this->cityList[30]="重庆";
	}
	function getCity($id){
		return $this->cityList[$id];
	}
	function findCityId($name){
		return array_search($name, $this->cityList);
	}
	function getAll(){
		return $this->cityList;
	}
}

?>
